/*
 * DictionaryTerm.h
 *
 *  Created on: Oct 12, 2012
 *      Author: m
 */

#ifndef DICTIONARYTERM_H_
#define DICTIONARYTERM_H_

#include <string>
#include <cstring>
#include <memory>
#include <cassert>
#include "../../physical_layer/physical_layer_commons.h"

#define _DICTIONARY_TERM_RESERVED_DEFAULT_VALUE 0 // Just for debugging purposes

class DictionaryTerm
{

private:
	std::string m_term;
	int   		m_randomKey;
	int   		m_reserved;
	friend class DictionaryTermLongSerializer;
	friend class DictionaryTermShortSerializer;

public:
	DictionaryTerm( const char* term, int randomKey, int reserved = _DICTIONARY_TERM_RESERVED_DEFAULT_VALUE );
	virtual ~DictionaryTerm();

	int getRandomKey();
	int getReserved();
	const char* getTerm();

};

#endif /* DICTIONARYTERM_H_ */
